﻿/****************************** Module Header ******************************\
 * Module Name:  ClipboardHelper.cs
 * Module Version:  1.0.0 (2014-1-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This class is used to draw captcha image.
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace UCL
{
    /// <summary>
    /// 剪贴板帮助类
    /// </summary>
    public class ClipboardHelper
    {
        public void SetText(string v,bool clear=true)
        {
            if (clear) Clipboard.Clear();
            // 文本为空的时候添加会失败
            if (!string.IsNullOrEmpty(v)) Clipboard.SetText(v);
        }
    }
}
